home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / programming / basic / udpchat / udp_chat.readme < prev    next >
Encoding:
Text File  |  1999-05-14  |  5.4 KB  |  93 lines

  1. Short:    UDPfuncsV2.4 for Blitz-good for Net games
  2. Author:   anton@ww.co.nz (Anton Reinauer)
  3. Uploader: anton@ww.co.nz (Anton Reinauer)
  4. Version:  2.4
  5. Type:     dev/basic
  6. Requires: dev/basic/TCP-to-Blitz.lha, WB 2.0+, min 1.5 meg mem.
  7.  
  8.   These are functions to use the UDP protocol for multiplayer internet
  9. games in Blitz2. Also there is a small IRC-like chat program which is a 
  10. good Net game communications test-bed. It checks wether packets have 
  11. arrived at their destination by using an acknowledgement system, and 
  12. resends packets if necessary. Also it can also act as either a Server 
  13. or Client. It has full Connect/Disconnect routines- each player is informed 
  14. of the new player and starts sending any messages to the new player, as 
  15. the communication is still Peer-To-Peer. Players are automatically 
  16. disconnected by the Server if they can't be contacted for a certain amount
  17. of time.
  18.   There's a few TCP functions as well, like converting an ASCII address to
  19. numerical (long), and vice-versa, getting your local IP address etc. Some 
  20. of the log-in and message protocols could be used in TCP games as well.
  21.   It has an Arexx port to allow you to automatically connect to other
  22. UDP_Chat programs from AmiComSys, IRC, StrICQ etc- you just have to pass a
  23. host address to UDP_Chat. 
  24.  
  25.   UDP is more appropriate for fast action games, like Doom clones,
  26. Xwing clones, or platformers, maze games etc; anything that needs small 
  27. lags (ping times), to remain playable over the Internet/LAN.
  28.  
  29.                          What's new in V2.4!
  30.  
  31.  Version 2.4  26/4/1999 
  32. ------------
  33.   Changed Exit{} - I took all the UDP stuff out of it and put it into 
  34. Close_UDP{}, in UDP_Funcs- Exit{} now calls Close_UDP{} instead. I took
  35. all the non comms stuff out of Comms_Housekeeping{} and put it into
  36. General_Housekeeping{}. I've added in lots of constants like #ONLINE,
  37. #SERVER, #HIGH etc, to make things easier to read and understand.
  38.   All the  Functions, Variables/Constants and Dims have been separated
  39. into Game (specific to UDP_Chat and can be easily changed for your game), and 
  40. UDP (specific only to the UDP Functions and independant of your game). 
  41. Print_String{} is before the UDP Functions, but when I change 
  42. Security_Warning{} and Comms_Debug{} to be GUI independant, it can be put
  43. with the Game Functions.
  44.    All Print_String{} calls in the Funcs have been replaced with 
  45. Security_Warning{} or Comms_Debug{} calls- they are called with different
  46. levels of degree, so you can just, for example print out System messages or
  47. all Security messages (from High priority to Low), by changing the variables
  48. `security' and `comms_debug_level'. So now it's much easier to put the
  49. UDP_Funcs into your game, as I've almost fully made the UDP_Funcs independant
  50. of the GUI.
  51.    Added checking in Decode_Packet{}, to make sure that we should be 
  52. able to receive the current packet in our current online state. 
  53.   Changed #DEBUG TO #COMMS_DEBUG. Comms_Housekeeping{} now returns wether
  54. we have been connected, disconnected or our connection attempt was rejected.
  55. #MAX_NUMBER_PLAYERS has been changed to a variable (max_number_players), to
  56. allow user to change the maximum number of allowed players (the function is
  57. is done, but I haven't written a GUI example yet).
  58.   Security_Warning{} has been moved in with the other UDP Funcs, along with
  59. Comms_Debug{}- at the moment they print to the GUI, but soon I will have
  60. them putting their messages into arrays, to allow them to be independant of
  61. the GUI. Added #SERVER_NUMBER=1, as the #SERVER number is changed to allow 
  62. for the added #ATTEMPTING_TO_CONNECT state. A few other changes are made
  63. for this as well.
  64.   UDP_Funcs is now V1.4. UDP_Header is V1.1 .
  65.   Fixed a couple of small bugs in Requested_Connection{}, and changed it's
  66. reply for a failed connection attempt to an unreliable message (WriteUDP{}).
  67. Fixed a couple of small bugs in Decode_Packet{}, and re-arranged it a bit
  68. to make in independant of the GUI. The call to Read_UDP{} is now done from
  69. Decode_Packet{}, instead of Comms_Housekeeping{}.
  70.    Window_Events{} had a couple of disconnect bugs and it's been changed
  71. to allow for the #ATTEMPTING_TO_CONNECT status. General_Housekeeping{}
  72. prints out the lag times now. 
  73.    UDP_Chat no longer starts up being able to act as Server, you have to
  74. put it in Server mode (as you would in a game) first- there's a Function,
  75. Initialise_Server{} to do it, and a button in UDP_Chat to put you in 
  76. Server mode. Also there's a Disconnect button to disconnect you from the
  77. game if you're a Client, and to close down the game and take you out of 
  78. Server mode if you're the Server- this done with the Disconnect_From_Game{}
  79. Function. 
  80.   The Delay buttons are now changed to button 1: (Delay 1 second), and 
  81. 2: (Delay 80 seconds), also button 8: pauses (freezes) and unpauses UDP_Chat.
  82. It prints `Me' in the lag time area at your player number, if you're a
  83. Client and Serv in the player 1 position if you're acting as Server.
  84.   All the Game Functions have been separated out and put together after
  85. the UDP_Funcs. The UDP Newtypes have been put into UDP_Header and the Game
  86. variables, constants, and Dims have been separated from the UDP ones and put 
  87. above the Game Functions. When I fix Security_Warning{} and Comms_Debug{}
  88. I can put Print_String{} in with the Game Functions, so all the UDP stuff
  89. will be together, so all you'd have to do to put them into your game is copy
  90. the entire UDP section and then paste it above your own Functions! All the
  91. UDP Functions could be put into the UDP_Funcs include if you didn't want
  92. them in your program.  
  93.